<template>
  <div id="maptest">
    <div id="container"></div>
  </div>
</template>

<script>
import { geolocation } from '@/utils/map'
export default {
  name: 'MapTest',
  mounted () {
    // new AMap.Map('container')
    geolocation().then((data) => {
      console.log(data, '成功')
    }).catch((error) => {
      console.log(error, '失败')
    })
  }
}
</script>

<style lang="scss" scoped>
#container {
  width:300px;
  height: 180px; 
}  
</style>
